//
//  MCICouldManager.swift
//  DocumentPickerDemo
//
//  Created by xthk_lmc on 2020/11/6.
//

import Foundation

//class MCICouldManager {
//    public static func iCouldEnable() -> Bool {
//        let url = FileManager.default.url(forUbiquityContainerIdentifier: nil)
//        return (url != nil)
//    }
//    
//    public static func downloadFile(WithDocumentUrl url: URL, completion: ((Data) -> Void)? = nil) {
//        let document = SxsDocument.init(fileURL: url)
//        document.open { (success) in
//            if success {
//                document.close(completionHandler: nil)
//            }
//            if let callback = completion {
//                callback(document.data)
//            }
//        }
//    }
//}
//
//class SxsDocument: UIDocumment {
//    public var data = Data.init()
//
//    
//    override func load(fromContents contents: Any, ofType typeName: String?) throws {
//        self.data = contents as! Data
//    }
//}
